<?php
/* @var $this MenuController */
/* @var $model Menu */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'menu-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

    <p class="note">Những trường <span class="required">*</span> bắt buộc phải nhập.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>1000,'id'=>'name')); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
    <div class="row">
        <?php echo $form->labelEx($model,'alias'); ?>
        <?php echo $form->textField($model,'alias',array('size'=>60,'maxlength'=>1000,'id'=>'alias')); ?>
        <?php echo $form->error($model,'alias'); ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'link'); ?>
		<?php echo $form->textField($model,'link',array('size'=>60,'maxlength'=>3000)); ?>
		<?php echo $form->error($model,'link'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'controler'); ?>
		<?php echo $form->textField($model,'controler',array('size'=>60,'maxlength'=>3000)); ?>
		<?php echo $form->error($model,'controler'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'action'); ?>
		<?php echo $form->textField($model,'action',array('size'=>60,'maxlength'=>3000)); ?>
		<?php echo $form->error($model,'action'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'is_active'); ?>
		<?php echo $form->checkBox($model,'is_active'); ?>
		<?php echo $form->error($model,'is_active'); ?>
	</div>

    <div class="row">
        <?php echo $form->labelEx($model,'ordering'); ?>
        <?php echo $form->textField($model,'ordering'); ?>
        <?php echo $form->error($model,'ordering'); ?>
    </div>

    <fieldset>
        <legend>Seo Website:</legend>
        <div class="row">
            <?php echo $form->labelEx($model,'meta_title'); ?>
            <?php echo $form->textField($model,'meta_title',array('size'=>100,'maxlength'=>3000)); ?>
            <?php echo $form->error($model,'meta_title'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'meta_description'); ?>
            <?php echo $form->textArea($model,'meta_description',array('size'=>100,'maxlength'=>3000,'cols'=>100,'rows'=>5)); ?>
            <?php echo $form->error($model,'meta_description'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'meta_keywords'); ?>
            <?php echo $form->textArea($model,'meta_keywords',array('size'=>100,'maxlength'=>3000,'cols'=>100,'rows'=>5)); ?>
            <?php echo $form->error($model,'meta_keywords'); ?>
        </div>
    </fieldset>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<script type="text/javascript">
    $("#name").focusout(function(){
        var strVN = $("#name").val();
        var strEN = UnSign(strVN);
        $("#alias").val(strEN);
    })
</script>